﻿namespace = poland

# start event
poland.1 = {
	type = country_event
	placement = root
	title = poland.1.t
	desc = poland.1.d
	flavor = poland.1.f

	duration = 3

	event_image = {
		video = "gfx/event_pictures/unspecific_factory_closed.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/factory_closed"

	icon = "gfx/interface/icons/event_icons/event_skull.dds"

	trigger = {
	}

	immediate = {
	}

	option = {
		name = poland.1.a
		add_journal_entry = {
			type = je_golden_liberty
		}
        add_journal_entry = {
			type = je_pol_king_maximilian
		}
		show_as_tooltip = {
            add_modifier = {
                name = modifier_slave_to_liberty
                months = -1
            }
            custom_tooltip = {
                text = diplomatic_plays_blocked_until_golden_liberty
                add_modifier = {
                    name = diplomatic_plays_blocked
                    months = -1
                }	
            }	
		}
	}
}

poland.2 = {
    type = country_event
    placement = root
    title = poland.2.t
    desc = poland.2.d
    flavor = poland.2.f

    duration = 3  

    event_image = {
		video = "gfx/event_pictures/unspecific_ruler_speaking_to_people.bk2"
	}

    on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/springtime_of_nation"

    icon = "gfx/interface/icons/event_icons/event_scales.dds"

    option = {
        name = poland.2.a
        c:POL = {
		    remove_diplomatic_pact = {
		    	country = c:LIT
		    	type = personal_union
		    }
		    create_diplomatic_pact = {
		    	country = c:LIT
		    	type = puppet
		    }
		}
        add_modifier = {
            name = modifier_magnate_oligarchy
            months = -1
        }
        remove_modifier = modifier_slave_to_liberty
	}
}

poland.3 = {
    type = country_event
    placement = root
    title = poland.3.t
    desc = poland.3.d
    flavor = poland.3.f

    duration = 3  

    event_image = {
		video = "gfx/event_pictures/unspecific_ruler_speaking_to_people.bk2"
	}

    on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific_ruler_speaking_to_people"

    icon = "gfx/interface/icons/event_icons/event_scales.dds"

    option = {
        name = poland.3.a
        c:POL = {
		    remove_diplomatic_pact = {
		    	country = c:LIT
		    	type = personal_union
		    }
		    create_diplomatic_pact = {
		    	country = c:LIT
		    	type = puppet
		    }
		}
        ROOT = {
            add_modifier = {
                name = modifier_noble_democracy
                months = -1
            }
            remove_modifier = modifier_slave_to_liberty
        }
	}
}

poland.4 = {
    type = country_event
    placement = root
    title = poland.4.t
    desc = poland.4.d
    flavor = poland.4.f

    duration = 3  

    event_image = {
		video = "gfx/event_pictures/europenorthamerica_russian_serfs.bk2"
	}

    on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/springtime_of_nation"

    icon = "gfx/interface/icons/event_icons/event_fire.dds"

    option = {
        name = poland.4.a
        if = { 
            limit = {
                ROOT = {
                    has_law = law_type:law_serfdom
                }
            }
            add_modifier = {
                name = modifier_eastern_slavery
                months = -1
            }
        }
        else = {
            ROOT = {
                add_modifier = {
                    name = modifier_eastern_oppression
                    months = -1
                }
            }
        }
    }
}

poland.5 = {
    type = country_event
    placement = root
    title = poland.5.t
    desc = poland.5.d
    flavor = poland.5.f

    event_image = {
		video = "gfx/event_pictures/europenorthamerica_russian_serfs.bk2"
	}

    on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
    on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/springtime_of_nation"

    icon = "gfx/interface/icons/event_icons/event_fire.dds"

    trigger = {
        c:PLC = root
        c:PLC = {
            is_diplomatic_play_initiator = yes
        }
        any_country = { 	
            is_secessionist = yes
            is_diplomatic_play_target = yes
            OR = {
                country_has_primary_culture = cu:cossack
                country_has_primary_culture = cu:byelorussian 
            }
        }
    }
    
    duration = 7

    immediate = {
        if = {
            limit = {
                exists = c:PLC
                c:PLC = root
                c:PLC = {
                    is_diplomatic_play_initiator = yes
                }
                any_country = {
                    is_secessionist = yes
                    is_diplomatic_play_target = yes
                }
            }
            random_country = {
                limit = {	
                    is_secessionist = yes
                    is_diplomatic_play_target = yes
                }
                change_tag = RTH
                if = {
					limit = {
						NOT = { has_law = law_type:law_serfdom_banned }
					}
					activate_law = law_type:law_serfdom_banned
				}
                activate_law = law_type:law_presidential_republic
		        activate_law = law_type:law_freedom_of_conscience
		        activate_law = law_type:law_right_of_assembly
		        activate_law = law_type:law_racial_segregation
		        activate_law = law_type:law_professional_army
		        activate_law = law_type:law_interventionism
		        activate_law = law_type:law_per_capita_based_taxation
		        activate_law = law_type:law_appointed_bureaucrats
		        activate_law = law_type:law_oligarchy

		        ig:ig_devout = {
			        set_interest_group_name = ig_orthodox_church
			        remove_ideology = ideology_patriarchal
			        add_ideology = ideology_orthodox_patriarch
		        }
            }
        }
    }

    option = {
        name = poland.5.a
    }
}

poland.6 = {
    type = country_event
    placement = root
    title = poland.6.t
    desc = poland.6.d
    flavor = poland.6.f

    event_image = {
		video = "gfx/event_pictures/europenorthamerica_russian_serfs.bk2"
	}

    on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
    on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/springtime_of_nation"

    icon = "gfx/interface/icons/event_icons/event_fire.dds"
    
    duration = 3

    option = {
        name = poland.6.a
        if = {
            limit = {
                has_modifier = modifier_eastern_slavery
            }
            remove_modifier = modifier_eastern_slavery
        }
        else = {
            remove_modifier = modifier_eastern_oppression
        }
    }
}

poland.10 = {
    type = country_event
    placement = root
    title = poland.10.t
    desc = poland.10.d
    flavor = poland.10.f

    duration = 3  

    event_image = {
		video = "gfx/event_pictures/unspecific_ruler_speaking_to_people.bk2"
	}

    on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific_ruler_speaking_to_people"

    icon = "gfx/interface/icons/event_icons/event_scales.dds"

    option = {
        name = poland.10.a
        c:POL = {
            if = {
                limit = {
                    exists = c:SMO
                }
                remove_diplomatic_pact = {
                    country = c:SMO
                    type = puppet
                }
                create_truce = { country = c:SMO months = 24 }
            }
            if = {
                limit = {
                    exists = c:KHK
                }
                remove_diplomatic_pact = {
                    country = c:KHK
                    type = puppet
                }
                create_truce = { country = c:KHK months = 24 }
            }
            if = {
                limit = {
                    exists = c:ZAZ
                }
                remove_diplomatic_pact = {
                    country = c:ZAZ
                    type = puppet
                }
                create_truce = { country = c:ZAZ months = 24 }
            }
            if = {
                limit = {
                    exists = c:KIE
                }
                remove_diplomatic_pact = {
                    country = c:KIE
                    type = puppet
                }
                c:KIE = {
                    change_tag = UKR
                }
                create_truce = { country = c:UKR months = 24 }
            }
		}

        set_global_variable = move_CSK
	}
}
